#!/bin/bash

while read line; do
    pkg_name=$(echo $line | cut -d'=' -f1)
    pip3 uninstall -y "$pkg_name"
done < <(pip3 freeze)